<h2>Listing Facets for <%= session[:node_name]%></h2>

<table cellspacing = "10">
  <tr>
  <% for column in Facet.content_columns %>
    <th><%= column.human_name %></th>
  <% end %>
  </tr>

<% for facet in @facets %>
  <tr>
  <% for column in Facet.content_columns %>
    <td><%=h facet.send(column.name) %></td>
  <% end %>
    <td><%= link_to 'Edit', :action => 'edit_facet', :id => facet %></td>
    <td><%= link_to 'Destroy', { :action => 'destroy_facet', :id => facet, :node_id => facet.node_id }, :confirm => 'Are you sure?', :method => :post %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New Facet', :action => 'new_facet' %>
